<template>
	<div class="addressListbox">
		<address-header>
		</address-header>
		<address-list class="addressList">
		</address-list>
	</div>
</template>

<script>
	import AddressList from "./AddressList";
	import AddressHeader from "./AddressHeader";
	import { mapGetters,mapMutations } from "vuex";
	export default {
		name: 'address',
		data() {
			return {
				msg: '这是收货地址页',
				page: "address",
				type: {
					list: "addressList",
					header: "addressHeader"
				}
			}
		},
		computed: {
			...mapGetters('xxy', [
				"getOrdergoback",
				"getaderssgorder"
			])
		},
		components: {
			'AddressList': AddressList,
			'AddressHeader': AddressHeader,
		},
		methods: {
			...mapMutations('xxy', [
				'setOrdergoback'
			])
		},
		created() {
			console.log(this.getOrdergoback,this.getaderssgorder,'77777')
			if(this.getOrdergoback === 1) {
				this.setOrdergoback(0)
				window.history.go(-this.getaderssgorder);
			}
		},
		mounted() {

		},
		updated() {},
		watch: {

		}
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
	.addressListbox {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	
	.addressList {
		flex: 1;
		overflow-y: auto;
		width: 100%;
	}
</style>